package com.lekang.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lekang.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lekang.common.annotation.Excel;
import com.lekang.common.core.domain.BaseEntity;

/**
 * 订单管理对象 order_management
 * 
 * @author ruitong
 * @date 2025-10-13
 */
public class OrderManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Excel(name = "主键ID")
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 老人外键ID */
    @Excel(name = "老人外键ID")
    private Long elderlyId;

    /** 护理项目外键ID */
    @Excel(name = "护理项目外键ID")
    private Long nursingItemId;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal orderAmount;

    /** 期望服务时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "期望服务时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expectedServiceTime;

    /** 下单人外键 */
    @Excel(name = "下单人外键")
    private Long orderUserId;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long orderStatus;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private Long transactionStatus;

    /** 取消原因 */
    private String cancelReason;

    /** 逻辑删除 */
    private Long isDeleted;

    /** 额外字段1 */
    private String extraField1;

    /** 额外字段2 */
    private String extraField2;

    /** 老人信息对象 */
    private Elderly elderly;

    /** 护理项目对象 */
    private NursingItem nursingItem;

    /** 下单人信息对象 */
    private SysUser orderUser;

    /** 床位信息对象 */
    private Bed bed;

    /** 老人姓名（查询条件） */
    private String elderlyName;

    /** 下单人姓名（查询条件） */
    private String orderUserName;

    /** 任务执行时间（来自task_arrangement表） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date executionTime;

    /** 退款时间（来自refund_record表） */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;

    /** 退款金额（来自refund_record表） */
    private java.math.BigDecimal refundAmount;

    /** 退款原因（来自refund_record表） */
    private String refundReason;


    // 新增查询字段的getter/setter方法
    public String getElderlyName() {
        return elderlyName;
    }

    public void setElderlyName(String elderlyName) {
        this.elderlyName = elderlyName;
    }

    public String getOrderUserName() {
        return orderUserName;
    }

    public void setOrderUserName(String orderUserName) {
        this.orderUserName = orderUserName;
    }

    public Date getExecutionTime() {
        return executionTime;
    }

    public void setExecutionTime(Date executionTime) {
        this.executionTime = executionTime;
    }

    public Date getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    public java.math.BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(java.math.BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    public Elderly getElderly() {
        return elderly;
    }

    public void setElderly(Elderly elderly) {
        this.elderly = elderly;
    }

    public NursingItem getNursingItem() {
        return nursingItem;
    }

    public void setNursingItem(NursingItem nursingItem) {
        this.nursingItem = nursingItem;
    }

    public SysUser getOrderUser() {
        return orderUser;
    }

    public void setOrderUser(SysUser orderUser) {
        this.orderUser = orderUser;
    }

    public Bed getBed() {
        return bed;
    }

    public void setBed(Bed bed) {
        this.bed = bed;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setElderlyId(Long elderlyId) 
    {
        this.elderlyId = elderlyId;
    }

    public Long getElderlyId() 
    {
        return elderlyId;
    }

    public void setNursingItemId(Long nursingItemId) 
    {
        this.nursingItemId = nursingItemId;
    }

    public Long getNursingItemId() 
    {
        return nursingItemId;
    }

    public void setOrderAmount(BigDecimal orderAmount) 
    {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount() 
    {
        return orderAmount;
    }

    public void setExpectedServiceTime(Date expectedServiceTime) 
    {
        this.expectedServiceTime = expectedServiceTime;
    }

    public Date getExpectedServiceTime() 
    {
        return expectedServiceTime;
    }

    public void setOrderUserId(Long orderUserId) 
    {
        this.orderUserId = orderUserId;
    }

    public Long getOrderUserId() 
    {
        return orderUserId;
    }

    public void setOrderStatus(Long orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus() 
    {
        return orderStatus;
    }

    public void setTransactionStatus(Long transactionStatus) 
    {
        this.transactionStatus = transactionStatus;
    }

    public Long getTransactionStatus() 
    {
        return transactionStatus;
    }

    public void setCancelReason(String cancelReason) 
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason() 
    {
        return cancelReason;
    }

    public void setIsDeleted(Long isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Long getIsDeleted() 
    {
        return isDeleted;
    }

    public void setExtraField1(String extraField1) 
    {
        this.extraField1 = extraField1;
    }

    public String getExtraField1() 
    {
        return extraField1;
    }

    public void setExtraField2(String extraField2) 
    {
        this.extraField2 = extraField2;
    }

    public String getExtraField2() 
    {
        return extraField2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderNo", getOrderNo())
                .append("elderlyId", getElderlyId())
                .append("nursingItemId", getNursingItemId())
                .append("orderAmount", getOrderAmount())
                .append("expectedServiceTime", getExpectedServiceTime())
                .append("orderUserId", getOrderUserId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("orderStatus", getOrderStatus())
                .append("transactionStatus", getTransactionStatus())
                .append("cancelReason", getCancelReason())
                .append("isDeleted", getIsDeleted())
                .append("extraField1", getExtraField1())
                .append("extraField2", getExtraField2())
                .append("elderly", getElderly())           // 新增
                .append("nursingItem", getNursingItem())   // 新增
                .append("orderUser", getOrderUser())       // 新增
                .append("bed", getBed())
                .append("elderlyName", getElderlyName())     // 新增
                .append("orderUserName", getOrderUserName()) // 新增// 新增
                .toString();
    }
}
